package com.lmt.repository;

import com.lmt.entity.Audit;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * Date 2018/07/17
 *
 * @author MT-Lin
 */
@Repository
public interface AuditRepository extends JpaRepository<Audit, String> {

	/**
	 * 根据审核对象ID和审核的操作查询
	 * @param objId 审核对象ID
	 * @param operation 审核的操作
	 * @return Audit
	 */
	Audit findByObjIdAndOperation(String objId, String operation);

	/**
	 * 根据审核对象ID和审核状态查询
	 * @param objId 审核对象ID
	 * @param status 审核状态
	 * @return Audit
	 */
	Audit findByObjIdAndStatusEquals(String objId, String status);
}
